﻿using System;
using System.Data;
using WP.Commons;

namespace WP.RM.DataEntity
{
    [System.ComponentModel.DesignerCategory("Code")]
    public class RMProductBOMRevDEL : DataSet, IDataEntity
    {
        public const string TABLENAME_RMProductRev = "rmProductBOMRev";
        public const string RECID = "RecId";
        public const string CategoryName = "CategoryName";
        public const string SetName = "SetName";        
        public const string ProductName="ProductName";
        public const string TechnicsName = "TechnicsName";
        public const string CategoryID = "CategoryID";
        public const string SetID = "SetID";
        public const string ProductFItemID = "ProductFItemID";
        public const string Remark="Remark";
        public const string TotalDetailCost = "TotalDetailCost";
        public const string TotalWastageCost = "TotalWastageCost";
        public const string TotalLabourCost = "TotalLabourCost";
        public const string TotalWorkCost = "TotalWorkCost";
        public const string TotalCost = "TotalCost";
        public const string VersionNo = "VersionNo";
        public const string VersionRemark = "VersionRemark";
        public const string RemarkRev = "RemarkRev";

        public const string TotalDetailCostRev = "TotalDetailCostRev";
        public const string TotalWastageCostRev = "TotalWastageCostRev";
        public const string TotalLabourCostRev = "TotalLabourCostRev";
        public const string TotalWorkCostRev = "TotalWorkCostRev";
        public const string TotalCostRev = "TotalCostRev";

        public const string RemarkDiff = "RemarkDiff";
        public const string TotalDetailCostDiff = "TotalDetailCostDiff";
        public const string TotalWastageCostDiff = "TotalWastageCostDiff";
        public const string TotalLabourCostDiff = "TotalLabourCostDiff";
        public const string TotalWorkCostDiff = "TotalWorkCostDiff";
        public const string TotalCostDiff = "TotalCostDiff";

        public const string CreateDate = "CreateDate";
        public const string Creator = "Creator";
        public const string VerClosed = "VerClosed";

        public const string StartCost = "StartCost";
         public const string   VersionCost="VersionCost";
        public const string    OtherCost="OtherCost";
          public const string  AvgUnitCost="AvgUnitCost";



        public const string RECSTAMP = "RecStamp";
        
        private System.Collections.Specialized.NameValueCollection mVarCollection = new System.Collections.Specialized.NameValueCollection();
        public System.Collections.Specialized.NameValueCollection VarCollection
        {
            get { return mVarCollection; }
            set { mVarCollection = value; }
        }

        public RMProductBOMRevDEL()
        {
            //Create mCity structure
            CreatemCityStructure();

        }

        //=========mCity============================
        private void CreatemCityStructure()
        {
            DataTable table;
            DataColumnCollection DCC;
            DataColumn DC = new DataColumn();
            table = new DataTable(TABLENAME_RMProductRev  );
            DCC = table.Columns;

            DC = new DataColumn(RECID, typeof(System.Int32));
            DCC.Add(DC);
            
            DC = new DataColumn(CategoryName, typeof(System.String));
            DC.DefaultValue = "";
            DCC.Add(DC);
            
            DC = new DataColumn(SetName, typeof(System.String));
            DC.DefaultValue = "";
            DCC.Add(DC);
             
            DC = new DataColumn(ProductName, typeof(System.String));
            DC.DefaultValue = "";
            DCC.Add(DC);

            DC = new DataColumn(CategoryID, typeof(System.String));
            DC.DefaultValue = "";
            DCC.Add(DC);

            DC = new DataColumn(SetID, typeof(System.String));
            DC.DefaultValue = "";
            DCC.Add(DC);

            DC = new DataColumn(ProductFItemID, typeof(System.Int32));
            DC.DefaultValue = 0;
            DCC.Add(DC);

            DC = new DataColumn(TechnicsName, typeof(System.String));
            DC.DefaultValue = "";
            DCC.Add(DC);
            
            
            DC = new DataColumn(Remark, typeof(System.String));
            DC.DefaultValue = "";
            DCC.Add(DC);

            
            DC = new DataColumn(TotalDetailCost, typeof(System.Double));
            DC.DefaultValue = 0;
            DCC.Add(DC);

             
            DC = new DataColumn(TotalWastageCost, typeof(System.Double));
            DC.DefaultValue =0;
            DCC.Add(DC);
            
            DC = new DataColumn(TotalLabourCost, typeof(System.Double));
            DC.DefaultValue = 0;
            DCC.Add(DC);
            
            DC = new DataColumn(TotalWorkCost, typeof(System.Double));
            DC.DefaultValue = 0;
            DCC.Add(DC);
            
            DC = new DataColumn(TotalCost, typeof(System.Double));
            DC.DefaultValue = 0;
            DCC.Add(DC);

            
            DC = new DataColumn(VersionNo, typeof(System.String));
            DC.DefaultValue = "";
            DCC.Add(DC);            
            
            DC = new DataColumn(RemarkRev, typeof(System.String));
            DC.DefaultValue = "";
            DCC.Add(DC);            
             
            DC = new DataColumn(TotalDetailCostRev, typeof(System.Double));
            DC.DefaultValue = 0;
            DCC.Add(DC);            
             
            DC = new DataColumn(TotalWastageCostRev, typeof(System.Double));
            DC.DefaultValue =0;
            DCC.Add(DC);
            
            DC = new DataColumn( TotalLabourCostRev , typeof(System.Double));
            DC.DefaultValue =0;
            DCC.Add(DC);
             
            DC = new DataColumn(TotalWorkCostRev, typeof(System.Double));
            DC.DefaultValue = 0;
            DCC.Add(DC);
            
            DC = new DataColumn(TotalCostRev, typeof(System.Double));
            DC.DefaultValue = 0;
            DCC.Add(DC);


            DC = new DataColumn(RemarkDiff, typeof(System.String));
            DC.DefaultValue = "";
            DCC.Add(DC);

            DC = new DataColumn(VersionRemark, typeof(System.String));
            DC.DefaultValue = "";
            DCC.Add(DC);

            DC = new DataColumn(TotalDetailCostDiff, typeof(System.Double));
            DC.DefaultValue = 0;
            DCC.Add(DC);

            DC = new DataColumn(TotalWastageCostDiff, typeof(System.Double));
            DC.DefaultValue =0;
            DCC.Add(DC);

            DC = new DataColumn(TotalLabourCostDiff, typeof(System.Double));
            DC.DefaultValue = 0;
            DCC.Add(DC);

            DC = new DataColumn(TotalWorkCostDiff, typeof(System.Double));
            DC.DefaultValue = 0;
            DCC.Add(DC);

            DC = new DataColumn(TotalCostDiff, typeof(System.Double));
            DC.DefaultValue = 0;
            DCC.Add(DC);

            DC = new DataColumn(CreateDate , typeof(System.DateTime ));
            DCC.Add(DC);

            DC = new DataColumn(Creator, typeof(System.String ));
            DC.DefaultValue ="";
            DCC.Add(DC);

            DC = new DataColumn(RECSTAMP, typeof(System.Byte[]));
            DCC.Add(DC);

            DC = new DataColumn(VerClosed, typeof(System.Boolean ));
            DC.DefaultValue =  0 ;
            DCC.Add(DC);

              DC = new DataColumn(StartCost, typeof(System.Double));
            DC.DefaultValue = 0;
            DCC.Add(DC);

              DC = new DataColumn(VersionCost, typeof(System.Double));
            DC.DefaultValue = 0;
            DCC.Add(DC);

              DC = new DataColumn(OtherCost, typeof(System.Double));
            DC.DefaultValue = 0;
            DCC.Add(DC);

              DC = new DataColumn(AvgUnitCost, typeof(System.Double));
            DC.DefaultValue = 0;
            DCC.Add(DC);
      


            this.Tables.Add(table);
        }
    }
}
